<!doctype html>
<!--
Tests that WebXR continues to work (rAFs continue to fire) after re-entering
presentation from the VR browser.
-->
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
  </head>
  <body>
    <canvas id="webgl-canvas"></canvas>
    <script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
    <script src="../resources/webxr_e2e.js"></script>
    <script src="../resources/webxr_boilerplate.js"></script>
    <script>
      setup({single_test: true});

      function stepVerifyFirstPresent() {
        onImmersiveXRFrameCallback = () => {
          onImmersiveXRFrameCallback = null;
          finishJavaScriptStep();
        };
      }

      function stepVerifyMagicWindow() {
        // TODO(bsheedy): Make this actually check something once magic window
        // support is implemented for WebXR
        finishJavaScriptStep();
      }

      function stepVerifySecondPresent() {
        onImmersiveXRFrameCallback = () => {
          done();
        };
      }
    </script>
  </body>
</html>
